import { isString } from "../isString";
import { HttpMethod } from "./HttpMethod";
import { methodHelper } from "./helper/methodHelper";

function isOptions(value: string): boolean;
function isOptions(value: Request): boolean;
function isOptions(value: string | Request): boolean {
  if (isString(value)) {
    return methodHelper(value as string, HttpMethod.OPTIONS);
  } else {
    return methodHelper(value as Request, HttpMethod.OPTIONS);
  }
}

export { isOptions };
